import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { RoomWrapper } from './style'
import SectionItem from './../section-item/index';

const SectionRooms = memo((props) => {
  const { roomList = [], ...other } = props
  return (
    <RoomWrapper>
      {
        roomList?.slice(0,8)?.map(item=>{
          return <SectionItem key={item.id} {...other} itemData={item} />
        })
      }
    </RoomWrapper>
  )
})

SectionRooms.propTypes = {
  roomList: PropTypes.array,
  itemWidth:PropTypes.string
}

export default SectionRooms